import { ICategoryList, ICategoryone } from "@/types/attr";
import server from "@/utils/http/server";


/**
 * @description 获取一级分类
 * @returns 
 */
export const reqCategory1List=()=>{
    return server<ICategoryone>('/admin/product/getCategory1','GET')
}

/**
 * @description 获取二级分类
 * @param category1Id 
 * @returns 
 */
export const reqCategory2List=(category1Id:string)=>{
    return server<ICategoryList>(`/admin/product/getCategory2/${category1Id}`,'GET')
}

/**
 * @description 获取三级分类
 * @param category2Id 
 * @returns 
 */
export const reqCategory3List=(category2Id:string)=>{
    return server<ICategoryList>(`/admin/product/getCategory3/${category2Id}`,'GET')
}